<!DOCTYPE html>
<html lang="zh_CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0" />
    <title>微信好友列表模仿</title>
    <style>
      h1 {
        text-align: center;
      }
      ul {
        display: flex;
        flex-wrap: wrap; /* 实现列表换行 */
        list-style: none; /*隐藏列表样式自带的黑点*/
      }
      li {
        display: flex;
        flex-direction: column;
        align-items: center; /* flex上下布局，左右居中 */

        margin-bottom: 5px; /* 距离底下间距5像素 */
        margin-right: 20px;
      }
      img {
        border-radius: 5px; /* 图片的四个边框的圆角为5像素 */
      }
      .name {
        flex: 1;
        border-bottom: 1px solid #f3f3f3; /* 边框线，也可以当做分割线，三个属性，从左到右为 1像素，直线，灰色背景 */
      }
    </style>
  </head>
  <body>
    <h1>班级同学照——初始模型</h1>
    <ul>
      <li>
        <img
          width="48"
          height="48"
          src="https://www.thiswaifudoesnotexist.net/example-65834.jpg"
          alt=""
        />
        <span class="name">好友1</span>
      </li>
      <li>
        <img
          width="48"
          height="48"
          src="https://www.thiswaifudoesnotexist.net/example-17702.jpg"
          alt=""
        />
        <span class="name">好友2</span>
      </li>
      <li>
        <img
          width="48"
          height="48"
          src="https://www.thiswaifudoesnotexist.net/example-65834.jpg"
          alt=""
        />
        <span class="name">好友3</span>
      </li>
      <li>
        <img
          width="48"
          height="48"
          src="https://www.thiswaifudoesnotexist.net/example-17702.jpg"
          alt=""
        />
        <span class="name">好友</span>
      </li>
      <li>
        <img
          width="48"
          height="48"
          src="https://www.thiswaifudoesnotexist.net/example-65834.jpg"
          alt=""
        />
        <span class="name">好友</span>
      </li>
      <li>
        <img
          width="48"
          height="48"
          src="https://www.thiswaifudoesnotexist.net/example-17702.jpg"
          alt=""
        />
        <span class="name">好友</span>
      </li>
      <li>
        <img
          width="48"
          height="48"
          src="https://www.thiswaifudoesnotexist.net/example-65834.jpg"
          alt=""
        />
        <span class="name">好友</span>
      </li>
      <li>
        <img
          width="48"
          height="48"
          src="https://www.thiswaifudoesnotexist.net/example-17702.jpg"
          alt=""
        />
        <span class="name">好友</span>
      </li>
      <li>
        <img
          width="48"
          height="48"
          src="https://www.thiswaifudoesnotexist.net/example-65834.jpg"
          alt=""
        />
        <span class="name">好友</span>
      </li>
      <li>
        <img
          width="48"
          height="48"
          src="https://www.thiswaifudoesnotexist.net/example-17702.jpg"
          alt=""
        />
        <span class="name">好友</span>
      </li>
    </ul>
  </body>
</html>
